<?php 

$fol = $material->getMat2Folders();
$a = array();
foreach($fol as $f)
{
	$a[]= $f->getFolder();
}

echo implode(' | ',$a);
?>